from django.shortcuts import render, HttpResponse


# Create your views here.
def login(request):

    if request.method == 'GET':
        return render(request, "login.html")
    else:
        username = request.POST.get("username")
        password = request.POST.get("password")
        if username != '' and password != '':
            return HttpResponse("登录成功！")
        else:
            return HttpResponse("用户名密码错误！")
